import request from '@/utils/request'
import {parseStrEmpty} from "@/utils/jhclothing";

// 查询服饰品类列表
export function listClothingType(query) {
  return request({
    url: '/product/clothingType/list',
    method: 'get',
    params: query
  })
}

// 查询服饰品类详细
export function getClothingType(clothingTypeId) {
  return request({
    url: '/product/clothingType/' + parseStrEmpty(clothingTypeId),
    method: 'get'
  })
}

// 新增服饰品类
export function addClothingType(data) {
  return request({
    url: '/product/clothingType',
    method: 'post',
    data: data
  })
}

// 修改服饰品类
export function updateClothingType(data) {
  return request({
    url: '/product/clothingType',
    method: 'put',
    data: data
  })
}

// 删除服饰品类
export function delClothingType(clothingTypeId) {
  return request({
    url: '/product/clothingType/' + clothingTypeId,
    method: 'delete'
  })
}
